package jm.data.structure.tree;

import jm.data.structure.tree.printer.BinaryTrees;

/**
 * @Description AVL树测试
 * @date 2022/4/14 9:17
 */
public class AVLTreeMain {
    public static void main(String[] args) {
        int[] data = {30, 5, 93, 82, 4, 99, 15, 96, 46, 21, 33, 60, 6, 85, 65, 39, 12};
        AVLTree<Integer> avlTree = new AVLTree<>();
        BinarySearchTree<Integer> bst = new BinarySearchTree<>();
        for (int i = 0; i < data.length; i++) {
            avlTree.add(data[i]);
            bst.add(data[i]);
        }
        BinaryTrees.println(bst);
        System.out.println();
        System.out.println();
        System.out.println();
        BinaryTrees.println(avlTree);


    }
}
